package god;

import java.util.Scanner;

public class J12SungJuk {
	public static void main(String[] args) {
		SungJuk sj = new SungJuk();
		sj.inputName( sj.makeScanner() );
		sj.getKor( sj.makeScanner() );
		sj.getEng( sj.makeScanner() );
		sj.getMat( sj.makeScanner() );

		System.out.println( sj.getTot(sj.kor, sj.eng, sj.mat) );
		System.out.println( sj.getAverage( sj.tot) );
		System.out.println( sj.getGrade(sj.avg) );
	}
}

class SungJuk {
	String name = "";
	int kor = 0, eng = 0, mat = 0;
	int tot = 0;
	double avg = 0;
	char grd = ' ';
	
	public Scanner makeScanner() {
		Scanner sc = new Scanner(System.in);
		return sc;
	}
	
	public void closeScanner(Scanner sc) {
		sc.close();
	}
	
	public String inputName(Scanner sc) {
	System.out.println("이름을 입력해주세요.");
	name = sc.next();																
	return name;
	}
	
	public int getKor(Scanner sc) {
	System.out.println("국어 성적을 입력해주세요.");
	kor = sc.nextInt();
	return kor;
	}
	
	public int getEng(Scanner sc) {
	System.out.println("영어 성적을 입력해주세요.");
	eng = sc.nextInt();
	return eng;
	}
	
	public int getMat(Scanner sc) {
	System.out.println("수학 성적을 입력해주세요.");
	mat = sc.nextInt();
	closeScanner(sc);																
	return mat;
	}
	
	public int getTot(int kor, int eng, int mat) {
		tot = kor + eng + mat;
		return tot;
	}
	
	public double getAverage(int tot) {
		avg = (double)tot / 3;
		return avg;
	}
	
	public char getGrade(double avg) {
		char grd;
			switch((int)avg / 10) {
				case 10 :
				case 9 : grd = '수';	break;
				case 8 : grd = '우';	break;
				case 7 : grd = '미';	break;
				case 6 : grd = '양';	break;
				default  : grd = '가';
				}
		return grd;
		}
}